Sort a string in alphabetical order by javascript